package com.example.seatatwo.mapper;

import com.example.seatatwo.bean.Two;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TwoMapper {

    @Select("SELECT * FROM two")
    List<Two> list();

    @Insert("insert into two (name) values (#{name})")
    int insert(@Param("name") String name);
}